package com.hyl.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Past;
import java.util.Date;

/**
 * @Description 用户
 * @Author hyl
 * @Date 2023/3/31 10:43
 **/
@Data
public class SysUser {
    private Integer	id;
    @NotNull(message = "不允许为空")
    @Length(min = 4,max = 8,message = "长度4-8之间")
	private String	account;
	private String	realName;
	@NotNull(message = "不允许为空")
	private String	password;
	private Integer	sex;
	@Past(message = "时间必须是过去式")
	@DateTimeFormat(pattern = "yyyy-MM-dd")
	private Date birthday;


	//只有一种角色==》多对一 ==》【多个用户 对 一个角色】

	private SysRole sysRole;


//	phone
//			address
//	roleId
//			createdUserId
//	createdTime
//			updatedUserId
//	updatedTime
	private String	idPicPath;
//	workPicPath

}
